import 'package:flutter/material.dart';
import 'package:hi_flutter/action_book/animatedlist_demo.dart';
import 'package:hi_flutter/action_book/constraints_demo.dart';
import 'package:hi_flutter/action_book/gridview_demo.dart';
import 'package:hi_flutter/action_book/inherited_widget_demo.dart';
import 'package:hi_flutter/action_book/letter_demo.dart';
import 'package:hi_flutter/action_book/nestedscroll_demo.dart';
import 'package:hi_flutter/action_book/pageview_demo.dart';
import 'package:hi_flutter/action_book/popscope_demo.dart';
import 'package:hi_flutter/action_book/scrollcontorller_demo.dart';
import 'package:hi_flutter/action_book/scrollnotification_demo.dart';
import 'package:hi_flutter/action_book/sliver_demo.dart';
import 'package:hi_flutter/action_book/state_demo.dart';
import 'package:hi_flutter/action_book/state_demo2.dart';
import 'package:hi_flutter/action_book/tabview_demo.dart';
import 'package:hi_flutter/action_book/theme_demo.dart';
import 'package:hi_flutter/action_book/themedata_demo.dart';
import 'package:hi_flutter/action_book/words_demo.dart';
import 'package:hi_flutter/animate/animate1.dart';
import 'package:hi_flutter/animate/animate10.dart';
import 'package:hi_flutter/animate/animate11.dart';
import 'package:hi_flutter/animate/animate12.dart';
import 'package:hi_flutter/animate/animate13.dart';
import 'package:hi_flutter/animate/animate2.dart';
import 'package:hi_flutter/animate/animate3.dart';
import 'package:hi_flutter/animate/animate4.dart';
import 'package:hi_flutter/animate/animate5.dart';
import 'package:hi_flutter/animate/animate6.dart';
import 'package:hi_flutter/animate/animate7.dart';
import 'package:hi_flutter/animate/animate8.dart';
import 'package:hi_flutter/animate/animate9.dart';
import 'package:hi_flutter/club/gesture_page.dart';
import 'package:hi_flutter/club/isolate_page.dart';
import 'package:hi_flutter/club/lifecycle_page.dart';
import 'package:hi_flutter/club/listview_page.dart';
import 'package:hi_flutter/club/paint_page.dart';
import 'package:hi_flutter/club/posts.dart';
import 'package:hi_flutter/club/signature.dart';
import 'package:hi_flutter/im/im.dart';

class AppDataUtil {
  static List<AppData> getAppDataList() {
    List<AppData> list = [];
    list.add(AppData(
      title: 'Animate1',
      widgetBuilder: (BuildContext context) => const AnimatePage1(),
    ));
    list.add(AppData(
      title: 'Animate2',
      widgetBuilder: (BuildContext context) => const AnimatePage2(),
    ));
    list.add(AppData(
      title: 'Animate3',
      widgetBuilder: (BuildContext context) => const AnimatePage3(),
    ));
    list.add(AppData(
      title: 'Animate4',
      widgetBuilder: (BuildContext context) => const AnimatePage4(),
    ));
    list.add(AppData(
      title: 'Animate5',
      widgetBuilder: (BuildContext context) => const AnimatePage5(),
    ));
    list.add(AppData(
      title: 'Animate6',
      widgetBuilder: (BuildContext context) => const AnimatePage6(),
    ));
    list.add(AppData(
      title: 'Animate7',
      widgetBuilder: (BuildContext context) => const AnimatePage7(),
    ));
    list.add(AppData(
      title: 'Animate8',
      widgetBuilder: (BuildContext context) => const AnimatePage8(),
    ));
    list.add(AppData(
      title: 'Animate9',
      widgetBuilder: (BuildContext context) => const AnimatePage9(),
    ));
    list.add(AppData(
      title: 'Animate10',
      widgetBuilder: (BuildContext context) => const AnimatePage10(),
    ));
    list.add(AppData(
      title: 'Animate11',
      widgetBuilder: (BuildContext context) => const AnimatePage11(),
    ));
    list.add(AppData(
      title: 'Animate12',
      widgetBuilder: (BuildContext context) => const AnimatePage12(),
    ));
    list.add(AppData(
      title: 'Animate13',
      widgetBuilder: (BuildContext context) => const AnimatePage13(),
    ));
    list.add(AppData(
      title: 'Signature',
      widgetBuilder: (BuildContext context) => const SignaturePage(),
    ));
    list.add(AppData(
      title: 'Posts',
      widgetBuilder: (BuildContext context) => const PostsPage(),
    ));
    list.add(AppData(
      title: 'Isolate',
      widgetBuilder: (BuildContext context) => const IsolateApp(),
    ));
    list.add(AppData(
      title: 'ChatApp',
      widgetBuilder: (BuildContext context) => const IMAppPage(),
    ));
    list.add(AppData(
      title: 'Lifecycle',
      widgetBuilder: (BuildContext context) => const LifecyclePage(),
    ));
    list.add(AppData(
      title: 'GestureDetector',
      widgetBuilder: (BuildContext context) => const GestureDetectorPage(),
    ));
    list.add(AppData(
      title: 'ListView',
      widgetBuilder: (BuildContext context) => const ListViewPage(),
    ));
    list.add(AppData(
      title: 'CustomPaint',
      widgetBuilder: (BuildContext context) => const PaintPage(),
    ));
    list.add(AppData(
      title: 'State',
      widgetBuilder: (BuildContext context) => const StatePage(),
    ));
    list.add(AppData(
      title: 'StateManage',
      widgetBuilder: (BuildContext context) => const StateDemoPage(),
    ));
    list.add(AppData(
      title: 'Constraints',
      widgetBuilder: (BuildContext context) => const ConstraintsDemoPage(),
    ));
    list.add(AppData(
      title: 'LetterList',
      widgetBuilder: (BuildContext context) => const LetterDemoPage(),
    ));
    list.add(AppData(
      title: 'WordsDemo',
      widgetBuilder: (BuildContext context) => const WordsDemoPage(),
    ));
    list.add(AppData(
      title: 'ScrollControllerDemo',
      widgetBuilder: (BuildContext context) => const ScrollControllerDemoPage(),
    ));
    list.add(AppData(
      title: 'ScrollNotificationDemo',
      widgetBuilder: (BuildContext context) => const ScrollNotificationDemoPage(),
    ));
    list.add(AppData(
      title: 'AnimatedListDemo',
      widgetBuilder: (BuildContext context) => const AnimatedListDemoPage(),
    ));
    list.add(AppData(
      title: 'GridViewDemo',
      widgetBuilder: (BuildContext context) => const GridViewDemoPage(),
    ));
    list.add(AppData(
      title: 'PageViewDemo',
      widgetBuilder: (BuildContext context) => const PageViewDemoPage(),
    ));
    list.add(AppData(
      title: 'TabViewDemo',
      widgetBuilder: (BuildContext context) => const TabViewDemoPage(),
    ));
    list.add(AppData(
      title: 'SliverDemo',
      widgetBuilder: (BuildContext context) => const SliverDemoPage(),
    ));
    list.add(AppData(
      title: 'NestedScrollViewDemo',
      widgetBuilder: (BuildContext context) => const NestedScrollViewDemoPage(),
    ));
    list.add(AppData(
      title: 'PopScopeDemo',
      widgetBuilder: (BuildContext context) => const PopScopeDemoPage(),
    ));
    list.add(AppData(
      title: 'InheritedWidgetDemo',
      widgetBuilder: (BuildContext context) => const InheritedWidgetDemoPage(),
    ));
    list.add(AppData(
      title: 'ThemeDemo',
      widgetBuilder: (BuildContext context) => const ThemeDemoPage(),
    ));
    list.add(AppData(
      title: 'ThemeDataDemo',
      widgetBuilder: (BuildContext context) => const ThemeDataDemoPage(),
    ));
    return list;
  }
}

class AppData {
  final String title;
  final WidgetBuilder widgetBuilder;

  const AppData({required this.title, required this.widgetBuilder});
}
